home *** CD-ROM | disk | FTP | other *** search
/ Total Web Page (Professional Suite) / Total Web Page 99.iso / CGI / DOWNLOAD.CGI-S=WWWBOARD&C=TXT&F=WWWBOARD.PL < prev    next >
Perl Script  |  1996-06-03  |  19KB  |  550 lines

  1. #!/usr/local/bin/perl
  2. ##############################################################################
  3. # WWWBoard                      Version 2.0 ALPHA 2                          #
  4. # Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
  5. # Created 10/21/95              Last Modified 11/25/95                       #
  6. # Scripts Archive at:           http://www.worldwidemart.com/scripts/        #
  7. ##############################################################################
  8. # COPYRIGHT NOTICE                                                           #
  9. # Copyright 1996 Matthew M. Wright  All Rights Reserved.                     #
  10. #                                                                            #
  11. # WWWBoard may be used and modified free of charge by anyone so long as      #
  12. # this copyright notice and the comments above remain intact.  By using this #
  13. # code you agree to indemnify Matthew M. Wright from any liability that      #  
  14. # might arise from it's use.                                                 #  
  15. #                                                                            #
  16. # Selling the code for this program without prior written consent is         #
  17. # expressly forbidden.  In other words, please ask first before you try and  #
  18. # make money off of my program.                                              #
  19. #                                                                            #
  20. # Obtain permission before redistributing this software over the Internet or #
  21. # in any other medium.  In all cases copyright and header must remain intact.#
  22. ##############################################################################
  23. # Define Variables
  24.  
  25. $basedir = "/path/to/wwwboard";
  26. $baseurl = "http://your.host.xxx/wwwboard";
  27. $cgi_url = "http://your.host.xx/cgi-bin/wwwboard.pl";
  28.  
  29. $mesgdir = "messages";
  30. $datafile = "data.txt";
  31. $mesgfile = "wwwboard.html";
  32. $faqfile = "faq.html";
  33.  
  34. $ext = "html";
  35.  
  36. $title = "WWWBoard Version 2.0 Test";
  37.  
  38. # Done
  39. ###########################################################################
  40.  
  41. ###########################################################################
  42. # Configure Options
  43.  
  44. $show_faq = 1;        # 1 - YES; 0 = NO
  45. $allow_html = 1;    # 1 = YES; 0 = NO
  46. $quote_text = 1;    # 1 = YES; 0 = NO
  47. $subject_line = 0;    # 0 = Quote Subject Editable; 1 = Quote Subject 
  48.             #   UnEditable; 2 = Don't Quote Subject, Editable.
  49. $use_time = 1;        # 1 = YES; 0 = NO
  50.  
  51. # Done
  52. ###########################################################################
  53.  
  54. # Get the Data Number
  55. &get_number;
  56.  
  57. # Get Form Information
  58. &parse_form;
  59.  
  60. # Put items into nice variables
  61. &get_variables;
  62.  
  63. # Open the new file and write information to it.
  64. &new_file;
  65.  
  66. # Open the Main WWWBoard File to add link
  67. &main_page;
  68.  
  69. # Now Add Thread to Individual Pages
  70. if ($num_followups >= 1) {
  71.    &thread_pages;
  72. }
  73.  
  74. # Return the user HTML
  75. &return_html;
  76.  
  77. # Increment Number
  78. &increment_num;
  79.  
  80. ############################
  81. # Get Data Number Subroutine
  82.  
  83. sub get_number {
  84.    open(NUMBER,"$basedir/$datafile");
  85.    $num = <NUMBER>;
  86.    close(NUMBER);
  87.    if ($num == 99999)  {
  88.       $num = "1";
  89.    }
  90.    else {
  91.       $num++;
  92.    }
  93. }
  94.  
  95. #######################
  96. # Parse Form Subroutine
  97.  
  98. sub parse_form {
  99.  
  100.    # Get the input
  101.    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  102.  
  103.    # Split the name-value pairs
  104.    @pairs = split(/&/, $buffer);
  105.  
  106.    foreach $pair (@pairs) {
  107.       ($name, $value) = split(/=/, $pair);
  108.  
  109.       # Un-Webify plus signs and %-encoding
  110.       $value =~ tr/+/ /;
  111.       $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  112.       $value =~ s/<!--(.|\n)*-->//g;
  113.  
  114.       if ($allow_html != 1) {
  115.          $value =~ s/<([^>]|\n)*>//g;
  116.       }
  117.       else {
  118.          unless ($name eq 'body') {
  119.         $value =~ s/<([^>]|\n)*>//g;
  120.          }
  121.       }
  122.  
  123.       $FORM{$name} = $value;
  124.    }
  125.  
  126. }
  127.  
  128. ###############
  129. # Get Variables
  130.  
  131. sub get_variables {
  132.  
  133.    if ($FORM{'followup'}) {
  134.       $followup = "1";
  135.       @followup_num = split(/,/,$FORM{'followup'});
  136.       $num_followups = @followups = @followup_num;
  137.       $last_message = pop(@followups);
  138.       $origdate = "$FORM{'origdate'}";
  139.       $origname = "$FORM{'origname'}";
  140.       $origsubject = "$FORM{'origsubject'}";
  141.    }
  142.    else {
  143.       $followup = "0";
  144.    }
  145.  
  146.    if ($FORM{'name'}) {
  147.       $name = "$FORM{'name'}";
  148.       $name =~ s/"//g;
  149.       $name =~ s/<//g;
  150.       $name =~ s/>//g;
  151.       $name =~ s/\&//g;
  152.    }
  153.    else {
  154.       &error(no_name);
  155.    }
  156.  
  157.    if ($FORM{'email'} =~ /.*\@.*\..*/) {
  158.       $email = "$FORM{'email'}";
  159.    }
  160.  
  161.    if ($FORM{'subject'}) {
  162.       $subject = "$FORM{'subject'}";
  163.       $subject =~ s/\&/\&\;/g;
  164.       $subject =~ s/"/\"\;/g;
  165.    }
  166.    else {
  167.       &error(no_subject);
  168.    }
  169.  
  170.    if ($FORM{'url'} =~ /.*\:.*\..*/ && $FORM{'url_title'}) {
  171.       $message_url = "$FORM{'url'}";
  172.       $message_url_title = "$FORM{'url_title'}";
  173.    }
  174.  
  175.    if ($FORM{'img'} =~ /.*tp:\/\/.*\..*/) {
  176.       $message_img = "$FORM{'img'}";
  177.    }
  178.  
  179.    if ($FORM{'body'}) {
  180.       $body = "$FORM{'body'}";
  181.       $body =~ s/\cM//g;
  182.       $body =~ s/\n\n/<p>/g;
  183.       $body =~ s/\n/<br>/g;
  184.  
  185.       $body =~ s/</</g; 
  186.       $body =~ s/>/>/g; 
  187.       $body =~ s/"/"/g;
  188.    }
  189.    else {
  190.       &error(no_body);
  191.    }
  192.  
  193.    if ($quote_text == 1) {
  194.       $hidden_body = "$body";
  195.       $hidden_body =~ s/</</g;
  196.       $hidden_body =~ s/>/>/g;
  197.       $hidden_body =~ s/"/"/g;
  198.    }
  199.  
  200.    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
  201.  
  202.    if ($sec < 10) {
  203.       $sec = "0$sec";
  204.    }
  205.    if ($min < 10) {
  206.       $min = "0$min";
  207.    }
  208.    if ($hour < 10) {
  209.       $hour = "0$hour";
  210.    }
  211.    if ($mon < 10) {
  212.       $mon = "0$mon";
  213.    }
  214.    if ($mday < 10) {
  215.       $mday = "0$mday";
  216.    }
  217.  
  218.    $month = ($mon + 1);
  219.  
  220.    @months = ("January","February","March","April","May","June","July","August","September","October","November","December");
  221.  
  222.    if ($use_time == 1) {
  223.       $date = "$hour\:$min\:$sec $month/$mday/$year";
  224.    }
  225.    else {
  226.       $date = "$month/$mday/$year";
  227.    }
  228.    chop($date) if ($date =~ /\n$/);
  229.  
  230.    $long_date = "$months[$mon] $mday, 19$year at $hour\:$min\:$sec";
  231. }      
  232.  
  233. #####################
  234. # New File Subroutine
  235.  
  236. sub new_file {
  237.  
  238.    open(NEWFILE,">$basedir/$mesgdir/$num\.$ext") || die $!;
  239.    print NEWFILE "<html>\n";
  240.    print NEWFILE "  <head>\n";
  241.    print NEWFILE "    <title>$subject</title>\n";
  242.    print NEWFILE "  </head>\n";
  243.    print NEWFILE "  <body>\n";
  244.    print NEWFILE "    <center>\n";
  245.    print NEWFILE "      <h1>$subject</h1>\n";
  246.    print NEWFILE "    </center>\n";
  247.    print NEWFILE "<hr size=7 width=75%>\n";
  248.    if ($show_faq == 1) {
  249.       print NEWFILE "<center>[ <a href=\"#followups\">Follow Ups</a> ] [ <a href=\"#postfp\">Post Followup</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ] [ <a href=\"$baseurl/$faqfile\">FAQ</a> ]</center>\n";
  250.    }
  251.    else {
  252.       print NEWFILE "<center>[ <a href=\"#followups\">Follow Ups</a> ] [ <a href=\"#postfp\">Post Followup</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ]</center>\n";
  253.    }
  254.    print NEWFILE "<hr size=7 width=75%><p>\n";
  255.  
  256.    print NEWFILE "Posted by ";
  257.  
  258.    if ($email) {
  259.       print NEWFILE "<a href=\"mailto:$email\">$name</a> on $long_date:<p>\n";
  260.    }
  261.    else {
  262.       print NEWFILE "$name on $long_date:<p>\n";
  263.    }
  264.  
  265.    if ($followup == 1) {
  266.       print NEWFILE "In Reply to: <a href=\"$last_message\.$ext\">$origsubject</a> posted by ";
  267.  
  268.       if ($origemail) {
  269.          print NEWFILE "<a href=\"$origemail\">$origname</a> on $origdate:<p>\n";
  270.       }
  271.       else {
  272.          print NEWFILE "$origname on $origdate:<p>\n";
  273.       }
  274.    }
  275.  
  276.    if ($message_img) {
  277.       print NEWFILE "<center><img src=\"$message_img\"></center><p>\n";
  278.    }
  279.    print NEWFILE "$body\n";
  280.    print NEWFILE "<br>\n";
  281.    if ($message_url) {
  282.       print NEWFILE "<ul><li><a href=\"$message_url\">$message_url_title</a></ul>\n";
  283.    }
  284.    print NEWFILE "<br><hr size=7 width=75%><p>\n";
  285.    print NEWFILE "<a name=\"followups\">Follow Ups:</a><br>\n";
  286.    print NEWFILE "<ul><!--insert: $num-->\n";
  287.    print NEWFILE "</ul><!--end: $num-->\n";
  288.    print NEWFILE "<br><hr size=7 width=75%><p>\n";
  289.    print NEWFILE "<a name=\"postfp\">Post a Followup</a><p>\n";
  290.    print NEWFILE "<form method=POST action=\"$cgi_url\">\n";
  291.    print NEWFILE "<input type=hidden name=\"followup\" value=\"";
  292.    if ($followup == 1) {
  293.       foreach $followup_num (@followup_num) {
  294.          print NEWFILE "$followup_num,";
  295.       }
  296.    }
  297.    print NEWFILE "$num\">\n";
  298.    print NEWFILE "<input type=hidden name=\"origname\" value=\"$name\">\n";
  299.    if ($email) {
  300.       print NEWFILE "<input type=hidden name=\"origemail\" value=\"$email\">\n";
  301.    }
  302.    print NEWFILE "<input type=hidden name=\"origsubject\" value=\"$subject\">\n";
  303.    print NEWFILE "<input type=hidden name=\"origdate\" value=\"$long_date\">\n";
  304.    print NEWFILE "Name: <input type=text name=\"name\" size=50><br>\n";
  305.    print NEWFILE "E-Mail: <input type=text name=\"email\" size=50><p>\n";
  306.    if ($subject_line == 1) {
  307.       if ($subject_line =~ /^Re:/) {
  308.          print NEWFILE "<input type=hidden name=\"subject\" value=\"$subject\">\n";
  309.          print NEWFILE "Subject: <b>$subject</b><p>\n";
  310.       }
  311.       else {
  312.          print NEWFILE "<input type=hidden name=\"subject\" value=\"Re: $subject\">\n";
  313.          print NEWFILE "Subject: <b>Re: $subject</b><p>\n";
  314.       }
  315.    } 
  316.    elsif ($subject_line == 2) {
  317.       print NEWFILE "Subject: <input type=text name=\"subject\" size=50><p>\n";
  318.    }
  319.    else {
  320.       if ($subject =~ /^Re:/) {
  321.          print NEWFILE "Subject: <input type=text name=\"subject\"value=\"$subject\" size=50><p>\n";
  322.       }
  323.       else {
  324.          print NEWFILE "Subject: <input type=text name=\"subject\" value=\"Re: $subject\" size=50><p>\n";
  325.       }
  326.    }
  327.    print NEWFILE "Comments:<br>\n";
  328.    print NEWFILE "<textarea name=\"body\" COLS=50 ROWS=10>\n";
  329.    if ($quote_text == 1) {
  330.       @chunks_of_body = split(/\<\;p\>\;/,$hidden_body);
  331.       foreach $chunk_of_body (@chunks_of_body) {
  332.          @lines_of_body = split(/\<\;br\>\;/,$chunk_of_body);
  333.          foreach $line_of_body (@lines_of_body) {
  334.             print NEWFILE ": $line_of_body\n";
  335.          }
  336.          print NEWFILE "\n";
  337.       }
  338.    }
  339.    print NEWFILE "</textarea>\n";
  340.    print NEWFILE "<p>\n";
  341.    print NEWFILE "Optional Link URL: <input type=text name=\"url\" size=50><br>\n";
  342.    print NEWFILE "Link Title: <input type=text name=\"url_title\" size=48><br>\n";
  343.    print NEWFILE "Optional Image URL: <input type=text name=\"img\" size=49><p>\n";
  344.    print NEWFILE "<input type=submit value=\"Submit Follow Up\"> <input type=reset>\n";
  345.    print NEWFILE "<p><hr size=7 width=75%>\n";
  346.    if ($show_faq == 1) {
  347.       print NEWFILE "<center>[ <a href=\"#followups\">Follow Ups</a> ] [ <a href=\"#postfp\">Post Followup</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ] [ <a href=\"$baseurl/$faqfile\">FAQ</a> ]</center>\n";
  348.    }
  349.    else {
  350.       print NEWFILE "<center>[ <a href=\"#followups\">Follow Ups</a> ] [ <a href=\"#postfp\">Post Followup</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ]</center>\n";
  351.    }
  352.    print NEWFILE "</body></html>\n";
  353.    close(NEWFILE);
  354. }
  355.  
  356. ###############################
  357. # Main WWWBoard Page Subroutine
  358.  
  359. sub main_page {
  360.    open(MAIN,"$basedir/$mesgfile") || die $!;
  361.    @main = <MAIN>;
  362.    close(MAIN);
  363.  
  364.    open(MAIN,">$basedir/$mesgfile") || die $!;
  365.    if ($followup == 0) {
  366.       foreach $main_line (@main) {
  367.          if ($main_line =~ /<!--begin-->/) {
  368.             print MAIN "<!--begin-->\n";
  369.         print MAIN "<!--top: $num--><li><a href=\"$mesgdir/$num\.$ext\">$subject</a> - <b>$name</b> <i>$date</i>\n";
  370.             print MAIN "(<!--responses: $num-->0)\n";
  371.             print MAIN "<ul><!--insert: $num-->\n";
  372.             print MAIN "</ul><!--end: $num-->\n";
  373.          }
  374.          else {
  375.             print MAIN "$main_line";
  376.          }
  377.       }
  378.    }
  379.    else {
  380.       foreach $main_line (@main) {
  381.      $work = 0;
  382.          if ($main_line =~ /<ul><!--insert: $last_message-->/) {
  383.             print MAIN "<ul><!--insert: $last_message-->\n";
  384.             print MAIN "<!--top: $num--><li><a href=\"$mesgdir/$num\.$ext\">$subject</a> - <b>$name</b> <i>$date</i>\n";
  385.             print MAIN "(<!--responses: $num-->0)\n";
  386.             print MAIN "<ul><!--insert: $num-->\n";
  387.             print MAIN "</ul><!--end: $num-->\n";
  388.          }
  389.          elsif ($main_line =~ /\(<!--responses: (.*)-->(.*)\)/) {
  390.             $response_num = $1;
  391.             $num_responses = $2;
  392.             $num_responses++;
  393.             foreach $followup_num (@followup_num) {
  394.                if ($followup_num == $response_num) {
  395.                   print MAIN "(<!--responses: $followup_num-->$num_responses)\n";
  396.           $work = 1;
  397.                }
  398.             }
  399.             if ($work != 1) {
  400.                print MAIN "$main_line";
  401.             }
  402.          }
  403.          else {
  404.             print MAIN "$main_line";
  405.          }
  406.       }
  407.    }
  408.    close(MAIN);
  409. }
  410.  
  411. ############################################
  412. # Add Followup Threading to Individual Pages
  413. sub thread_pages {
  414.  
  415.    foreach $followup_num (@followup_num) {
  416.       open(FOLLOWUP,"$basedir/$mesgdir/$followup_num\.$ext");
  417.       @followup_lines = <FOLLOWUP>;
  418.       close(FOLLOWUP);
  419.  
  420.       open(FOLLOWUP,">$basedir/$mesgdir/$followup_num\.$ext");
  421.       foreach $followup_line (@followup_lines) {
  422.          $work = 0;
  423.          if ($followup_line =~ /<ul><!--insert: $last_message-->/) {
  424.         print FOLLOWUP "<ul><!--insert: $last_message-->\n";
  425.             print FOLLOWUP "<!--top: $num--><li><a href=\"$num\.$ext\">$subject</a> <b>$name</b> <i>$date</i>\n";
  426.             print FOLLOWUP "(<!--responses: $num-->0)\n";
  427.             print FOLLOWUP "<ul><!--insert: $num-->\n";
  428.             print FOLLOWUP "</ul><!--end: $num-->\n";
  429.          }
  430.          elsif ($followup_line =~ /\(<!--responses: (.*)-->(.*)\)/) {
  431.             $response_num = $1;
  432.             $num_responses = $2;
  433.             $num_responses++;
  434.             foreach $followup_num (@followup_num) {
  435.                if ($followup_num == $response_num) {
  436.                   print FOLLOWUP "(<!--responses: $followup_num-->$num_responses)\n";
  437.                   $work = 1;
  438.                }
  439.             }
  440.             if ($work != 1) {
  441.                print FOLLOWUP "$followup_line";
  442.             }
  443.          }
  444.          else {
  445.             print FOLLOWUP "$followup_line";
  446.          }
  447.       }
  448.       close(FOLLOWUP);
  449.    }
  450. }
  451.  
  452. sub return_html {
  453.    print "Content-type: text/html\n\n";
  454.    print "<html><head><title>Message Added: $subject</title></head>\n";
  455.    print "<body><center><h1>Message Added: $subject</h1></center>\n";
  456.    print "The following information was added to the message board:<p><hr size=7 width=75%><p>\n";
  457.    print "<b>Name:</b> $name<br>\n";
  458.    print "<b>E-Mail:</b> $email<br>\n";
  459.    print "<b>Subject:</b> $subject<br>\n";
  460.    print "<b>Body of Message:</b><p>\n";
  461.    print "$body<p>\n";
  462.    if ($message_url) {
  463.       print "<b>Link:</b> <a href=\"$message_url\">$message_url_title</a><br>\n";
  464.    }
  465.    if ($message_img) {
  466.       print "<b>Image:</b> <img src=\"$message_img\"><br>\n";
  467.    }
  468.    print "<b>Added on Date:</b> $date<p>\n";
  469.    print "<hr size=7 width=75%>\n";
  470.    print "<center>[ <a href=\"$baseurl/$mesgdir/$num\.$ext\">Go to Your Message</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ]</center>\n";
  471.    print "</body></html>\n";
  472. }
  473.  
  474. sub increment_num {
  475.    open(NUM,">$basedir/$datafile") || die $!;
  476.    print NUM "$num";
  477.    close(NUM);
  478. }
  479.  
  480. sub error {
  481.    $error = $_[0];
  482.  
  483.    print "Content-type: text/html\n\n";
  484.  
  485.    if ($error eq 'no_name') {
  486.       print "<html><head><title>$title ERROR: No Name</title></head>\n";
  487.       print "<body><center><h1>ERROR: No Name</h1></center>\n";
  488.       print "You forgot to fill in the 'Name' field in your posting.  Correct it below and re-submit.  The necessary fields are: Name, Subject and Message.<p><hr size=7 width=75%><p>\n";
  489.       &rest_of_form;
  490.    }
  491.    elsif ($error eq 'no_subject') {
  492.       print "<html><head><title>$title ERROR: No Subject</title></head>\n";
  493.       print "<body><center><h1>ERROR: No Subject</h1></center>\n";
  494.       print "You forgot to fill in the 'Subject' field in your posting.  Correct it below and re-submit.  The necessary fields are: Name, Subject and Message.<p><hr size=7 width=75%><p>\n";
  495.       &rest_of_form;
  496.    }
  497.    elsif ($error eq 'no_body') {
  498.       print "<html><head><title>$title ERROR: No Message</title></head>\n";
  499.       print "<body><center><h1>ERROR: No Message</h1></center>\n";
  500.       print "You forgot to fill in the 'Message' fieldin your posting.  Correct it below and re-submit.  The necessary fields are: Name, Subjectand Message.<p><hr size=7 width=75%><p>\n";
  501.       &rest_of_form;
  502.    }
  503.    else {
  504.       print "ERROR!  Undefined.\n";
  505.    }
  506.    exit;
  507. }
  508.  
  509. sub rest_of_form {
  510.  
  511.    print "<form method=POST action=\"$cgi_url\">\n";
  512.  
  513.    if ($followup == 1) {
  514.       print "<input type=hidden name=\"origsubject\" value=\"$FORM{'origsubject'}\">\n";
  515.       print "<input type=hidden name=\"origname\" value=\"$FORM{'origname'}\">\n";
  516.       print "<input type=hidden name=\"origemail\" value=\"$FORM{'origemail'}\">\n";
  517.       print "<input type=hidden name=\"origdate\" value=\"$FORM{'origdate'}\">\n";
  518.       print "<input type=hidden name=\"followup\" value=\"$FORM{'followup'}\">\n";
  519.    }
  520.    print "Name: <input type=text name=\"name\" value=\"$FORM{'name'}\" size=50><br>\n";
  521.    print "E-Mail: <input type=text name=\"email\" value=\"$FORM{'email'}\" size=50><p>\n";
  522.    if ($subject_line == 1) {
  523.       print "<input type=hidden name=\"subject\" value=\"$FORM{'subject'}\">\n";
  524.       print "Subject: <b>$FORM{'subject'}</b><p>\n";
  525.    } 
  526.    else {
  527.       print "Subject: <input type=text name=\"subject\" value=\"$FORM{'subject'}\" size=50><p>\n";
  528.    }
  529.    print "Message:<br>\n";
  530.    print "<textarea COLS=50 ROWS=10 name=\"body\">\n";
  531.    $FORM{'body'} =~ s/</</g;
  532.    $FORM{'body'} =~ s/>/>/g;
  533.    $FORM{'body'} =~ s/"/"/g;
  534.    print "$FORM{'body'}\n";
  535.    print "</textarea><p>\n";
  536.    print "Optional Link URL: <input type=text name=\"url\" value=\"$FORM{'url'}\" size=45><br>\n";
  537.    print "Link Title: <input type=text name=\"url_title\" value=\"$FORM{'url_title'}\" size=50><br>\n";
  538.    print "Optional Image URL: <input type=text name=\"img\" value=\"$FORM{'img'}\" size=45><p>\n";
  539.    print "<input type=submit value=\"Post Message\"> <input type=reset>\n";
  540.    print "</form>\n";
  541.    print "<br><hr size=7 width=75%>\n";
  542.    if ($show_faq == 1) {
  543.       print "<center>[ <a href=\"#followups\">Follow Ups</a> ] [ <a href=\"#postfp\">Post Followup</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ] [ <a href=\"$baseurl/$faqfile\">FAQ</a> ]</center>\n";
  544.    }
  545.    else {
  546.       print "<center>[ <a href=\"#followups\">Follow Ups</a> ] [ <a href=\"#postfp\">Post Followup</a> ] [ <a href=\"$baseurl/$mesgfile\">$title</a> ]</center>\n";
  547.    }
  548.    print "</body></html>\n";
  549. }
  550.